function z = find_gkNoL(xx)
global N tauL tauK betta alpha depr sigmaC popweight phi lam gassetrat e_real govery
g1=xx(1);
kg=xx(2);
kss=xx(3);
depr=alpha*e_real^(1-alpha)*kss^(alpha-1)-(1/betta-1)/(1-tauK); %the Euler at ss gives depr
css=(kss^alpha*e_real^(1-alpha)-g1-depr*kss)/(popweight(1)+sum(popweight(2:N).*lam)); %the resource constraint gives c1
wss=(1-alpha)*kss^alpha*e_real^(-alpha);
l1ss=e_real;
k1ss=(css^(-sigmaC)*(css-(1-tauL)*wss*phi(1)*l1ss))/(1-betta)/css^(-sigmaC)/(1+(alpha*(e_real/kss)^(1-alpha)-depr)*(1-tauK)); %lifetime budget constraint of group 1
k2ss=(css^(-sigmaC)*(lam*css-(1-tauL)*wss*phi(2)*l1ss))/(1-betta)/css^(-sigmaC)/(1+(alpha*(e_real/kss)^(1-alpha)-depr)*(1-tauK));
z(1)=kss-kg-popweight(1)*k1ss-popweight(2)*k2ss; %weighted sum of groups' capital holdings must match aggregate capital
rss = (betta^(-1)-1)/(1-tauK)+depr; %r from Euler at the steady state
z(2)=kg/kss^alpha/e_real^(1-alpha)-gassetrat;
z(3)=g1/kss^alpha/e_real^(1-alpha)-govery;



